import QtQuick 2.12
import QtQuick.Window 2.12

Window {
    visible: true
    width: 640
    height: 480
    title: qsTr("Transformations")

    //点击其他区域，返回初始状态
    MouseArea{
        anchors.fill: parent
        onClicked: {
        qq1.x=50;
        qq2.rotation=0;
        qq3.scale=1.0;
        }
    }

    ClickableImage{
        id: qq1
        width: 150
        height: 150
        x: 50;y: 68
        source: '../images/qq.png'
        //点击后往右移动5个像素
        onClicked: {
            x+= 5;
        }
    }
    ClickableImage{
        id: qq2
        width: 150
        height: 150
        x: 150;y: 68
        source: '../images/qq.png'

        //点击后顺时针旋转10度
        onClicked: {
            rotation+=10

        }
    }
    ClickableImage{
        id: qq3
        width: 150
        height: 150
        x: 250;y: 68
        source: '../images/qq.png'

        //点击进行缩放
        onClicked: {
            scale+=0.1
        }
    }


}
